const webpack = require('webpack')
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  publicPath: process.env.NODE_ENV === 'development' ? '/' : '/vue1/',
  transpileDependencies: true,
  outputDir: 'vue1',
  devServer: {
    host: 'localhost',
    port: 4000,
    headers: {
      'Access-Control-Allow-Origin': '*',
    }
  },
  configureWebpack: {
    output: {
      library: `vueApp1`,
      libraryTarget: 'umd', // 把微应用打包成 umd 库格式
    },
  }
})
